package com.task.mall.service.impl;

import com.task.mall.bean.Admin;
import com.task.mall.bean.Login;
import com.task.mall.bean.Password;
import com.task.mall.dao.AdminDao;
import com.task.mall.dao.impl.AdminDaoImpl;
import com.task.mall.service.AdminService;
import java.util.List;

public class AdminServiceImpl implements AdminService {
    private AdminDao adminDao = new AdminDaoImpl();

    @Override
    public int login(Admin admin) {
        return adminDao.login(admin);
    }

    @Override
    public List<Admin> queryAllAdmins() {
        return adminDao.queryAllAdmins();
    }

    @Override
    public List<Admin> querySearchAdmins(Admin admin) {
        return adminDao.querySearchAdmins(admin);
    }

    @Override
    public int addAdminss(Admin admin) {
        return adminDao.addAdminss(admin);
    }

    @Override
    public int deleteAdmins(int id) {
        return adminDao.deleteAdmins(id);
    }

    @Override
    public Admin getAdminsInfo(int id) {
        return adminDao.getAdminsInfo(id);
    }

    @Override
    public Login getLoginInfo(String email) {
        return adminDao.getLoginInfo(email);
    }

    @Override
    public int updateAdminss(Admin admin) {
        return adminDao.updateAdminss(admin);
    }

    @Override
    public int changePwd(Password password) {
        return adminDao.changePwd(password);
    }

}
